import React from 'react'
import {BrowserRouter, Route, Switch} from 'react-router-dom'
import App from '../App'
import NotFound from '../containers/NotFound'
import Home from '../containers/Home'
import City from '../containers/City'
import Search from "../containers/Search"
import Detail from '../containers/Detail'
import Login from '../containers/Login'
import User from '../containers/User'

class RouterMap extends React.Component { 

  render() {
    return (
      <div>
        <App>
          <BrowserRouter>
            <Switch>
              <Route path="/" exact component={Home}/>
              <Route path="/city" component={City}/>
              <Route path="/login/:router?" component={Login}/>
              <Route path='/User' component={User}/>
              <Route path="/search/:category/:keyword?" component={Search}/>
              <Route path="/detail/:id" component={Detail}/>
              <Route path='*' component={NotFound}/>
            </Switch>
          </BrowserRouter>
        </App>
      </div>
    )
  }
}

export default RouterMap
